package com.mgr.controller;

import java.util.Map;
import javax.servlet.http.HttpSession;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import com.mgr.service.CustomerService;

@Controller
public class MainPageController {

	@Autowired
	private CustomerService custService;
	
	@RequestMapping("mainpage")
	public String getMainPage(Map<String, Object> map, HttpSession session) {
		String result = "welcome.tile";
		String id = (String) session.getAttribute("user");
		if(id == null || id == "") result = "login";
		return  result;
	}
	
}
